package com.example.yupao.utils;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import org.junit.jupiter.api.Test;

import java.util.Date;

/**
 * @Author hhf
 * @Date 2024/8/31
 * @Description
 */
public class DateUtils {

    @Test
    void testDateUtis(){
        //"2024-08-26 14:45:31"
        Date date = new Date();
        System.out.println(date);
        DateTime dateTime = DateUtil.beginOfDay(date);
        DateTime endOfDay = DateUtil.endOfDay(date);
        System.out.println(dateTime);
        System.out.println(endOfDay);
    }
}
